<div class="modal-header">
  <div class="modal-title">{{ record.ID > 0 ? '编辑 ' + record.username : '新建' }}</div>
</div>
<nz-spin *ngIf="!i" class="modal-spin"></nz-spin>
<div *ngIf="i">
  <form nz-form [formGroup]="validateForm">
    <input nz-input hidden formControlName="ID" />
    <div nz-row [nzGutter]="24">
      <div nz-col [nzSpan]="20">
        <nz-form-item>
          <nz-form-label [nzSpan]="8" nzRequired nzFor="company_name">公司名称</nz-form-label>
          <nz-form-control [nzSpan]="16" nzHasFeedback nzErrorTip="请填写公司名称！">
            <input nz-input formControlName="company_name" placeholder="公司名称" />
          </nz-form-control>
        </nz-form-item>
      </div>
    </div>
  </form>
</div>

<div class="modal-footer">
  <button nz-button type="button" (click)="close()">关闭</button>
  <button
    nz-button
    type="submit"
    nzType="primary"
    (click)="save(validateForm.value)"
    [disabled]="!validateForm.valid"
    [nzLoading]="http.loading"
    >保存
  </button>
</div>
